﻿<script src="<?php echo $baseurl?>public/ckeditor/ckeditor.js"></script>
<script src="<?php echo $baseurl?>public/ckeditor/adapters/jquery.js"></script>

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">Thêm dự án</h1>
	</div>
	<!-- /.col-lg-12 -->
	
</div>

<!-- /.row -->

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-8">
                        <?php echo form_open();?>
                            <div class="form-group">
                                <label>Tên dự án</label>
                                <input class="form-control" type="text" name="project_name" value="<?php echo $this->input->post('project_name')?>" placeholder="Tên dự án"/>
                            </div>
                            <div class="form-group">
                                <label>Nội dung dự án</label>
                                <textarea class="form-control autoheight" name="content" id="content" placeholder="Nội dung dự án"><?php echo $this->input->post('content')?></textarea>
                            </div>
                            <div class="form-group">
                                <label>Thời gian bắt đầu</label>
                                <input class="form-control" name="time_start" value="<?php echo $this->input->post('time_start')?>" id="time_start" type="text" style="width:25% !important" />
                            </div>
                            <div class="form-group">
                                <label>Thời gian kết thúc</label>
                                <input class="form-control" name="time_end" value="<?php echo $this->input->post('time_end')?>" id="time_end" type="text" style="width:25% !important" />
                            </div>
                            <div class="form-group">
                                <label>Google Docs</label>
                                <input class="form-control" type="text" name="docs" value="<?php echo $this->input->post('docs')?>" placeholder="Đường dẫn Google Docs"/>
                            </div>
                            <div class="form-group">
                                <label>Trạng thái</label>
                                <?php $s_arr = array(
                                        '0' => 'Chưa hoạt động', 
                                        '1' => 'Đang xử lý', 
                                        '2' => 'Đã hoàn thành'); 
                                echo $fview->selectOption($s_arr, $this->input->post('status'), 'form-control status', 'status');?> 
                            </div>
                            <div class="form-group">
                                <label>Chọn nhân viên</label>
                                <?php echo $fview->multiSelectType($users, array(), 'users', 'Chọn nhân viên');?> 
                            </div>
                            <button type="submit" class="btn btn-outline btn-primary">Tạo</button>
                            <a href="<?php echo $baseurl?>" class="btn btn-outline btn-default">Hủy</a>
                        </form>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.panel-body -->
        </div>
	</div>
	<!-- /.col-lg-12 -->
	
</div>

<!-- /.row -->

<script type="text/javascript"> 
  $( document ).ready(function() {
    $( "#time_start" ).datepicker({ dateFormat: 'dd/mm/yy' });
    $( "#time_end" ).datepicker({ dateFormat: 'dd/mm/yy' });
  });
</script>

<script type="text/javascript">
        CKEDITOR.replace( 'content', {  enterMode : CKEDITOR.ENTER_BR, shiftEnterMode : CKEDITOR.ENTER_BR } );
        CKEDITOR.on( 'instanceReady', function( ev )
        {
         ev.editor.dataProcessor.writer.setRules( 'br',
         {
            indent : false,
            breakBeforeOpen : false,
            breakAfterOpen : false,
            breakBeforeClose : false,
            breakAfterClose : false
		});
		});
</script> 

<!--script src="<?php echo $baseurl?>public/flexText/jquery.flexText.min.js"></script>
<link rel="stylesheet" href="<?php echo $baseurl?>public/flexText/style.css"/>
<script>
    $(function () {
        $('.autoheight').flexText();
    });
</script-->

